added pseudocode for login