Implemented Login Logic.(User Authentication)