Adds reuse credentials test
Added unit test for expired token
Fixed expiration time check and added logging