Made funcitonal login