rewrite login form validation, redirect to previous page upon successfully login.
Merge pull request #117 from leirocky/dev

Nice !