Reworked cookie logic

made cookie logic extremely simple so that users when logging in will
stay logged in if cookie is set