created login functionality

@swethanaretla this whole file is not having proper indentation.