Some refactoring...

refactored loginAction

fixed some coding standard (without change it)