changed some errorhandling and loginthings