Added tests, fixed critical signup issue