added time functions for authentication