add method for authorization with code