check for login fixes #814