Changed log_in logic to be try/except.