Prevent users from accessing sign-in/sign-up forms
while logged in. Also reformatted code.