do some refactoring
enable out buffer in login.php