Improve login for geofence and beacon