logout user if there is an error with their details - need to test it