Fixed exception
finished up the login stuff