v21 compatibility for login activity