This is most a brain dump of what needs to be done:
- (!) Error checking
- Cleaner layout
- (!) Check for invailed char in certain fields, eg loginid
