changed index, added user logic to homepage