Working login

Working login, finaly managed to make it work correctly!!!