Added button status changing function for authorization.