Ordering of code. There's no point in creating datetime objects if the user is a RUSER anyway.
Use the short form of conditionals.
More explanaplanatory failure modes when logging in.