online_user's ip address must match params[:ip]: depending on your settings the same user could authenticate multiple times with different IP.