bug fixes and calling authenticate user on entry