Replaced deprecated backticks and updated logged in users function.