Main page now redirects to Dashboard if user is logged in.
revamped login check