Fixed the bug for not allow reg; redirect to login page.

1. Fixed the bug for not allowing register, if not logged in, redirect
to login page
2. adjust a little on login page view.