Added state diagram for login process