adding /home/login handling
more error handling