fix js error, update for mobile
add logout functionality