OMfixed login check to make it simpler and better