Providing your system details (what Ubuntu product & release you’re using) is always helpful.
Have you tried logging in via a text terminal? Whilst what you describe may stop a GUI login, it may not stop a text terminal login; though you didn’t specify what exact change you made.
If you’re able to get into a terminal, sudo chmod 755 ~ sets the directory permissions back to default, if that doesn’t help could you run sudo ls -latr /home and paste the output here?