Made some tweaks to account validation and logout