Simplify checkLogin