Refactoring Log_in_successful