getting active user from database