dev

1. rewrite login form validation
2. redirect to previous page upon successfully login.