Rediret to mainpage if login from auth pages. Fix #697
add slash to make sure is URL base
Merge pull request #708 from squirrelo/issue-697

Redirect to mainpage if login from auth pages. Fix #697