Added authentication to login