Fixed user login and auth checking issues