count time only if session[:user] is not nil